<?php

namespace JLPay\Models\Clearing;

use JLPay\Models\BaseRequest;

/**
 * 提现申请请求
 */
class WithdrawApplyRequest extends BaseRequest
{
    /**
     * API前缀
     */
    public const API_PREFIX = '/fund/withdraw';
    
    /**
     * API URI
     */
    public const API_URI = '/apply';

    protected ?string $merchNo = null;
    protected ?string $orgNo = null;
    protected ?string $amount = null;
    protected ?string $settleType = null;
    protected ?string $outSettleId = null;
    protected ?string $notifyUrl = null;
    protected ?string $postscript = null;

    /**
     * 设置商户号
     *
     * @param string $merchNo
     * @return self
     */
    public function setMerchNo(string $merchNo): self
    {
        $this->merchNo = $merchNo;
        return $this;
    }

    /**
     * 设置机构号
     *
     * @param string $orgNo
     * @return self
     */
    public function setOrgNo(string $orgNo): self
    {
        $this->orgNo = $orgNo;
        return $this;
    }

    /**
     * 设置金额
     *
     * @param string $amount
     * @return self
     */
    public function setAmount(string $amount): self
    {
        $this->amount = $amount;
        return $this;
    }

    /**
     * 设置结算类型
     *
     * @param string $settleType
     * @return self
     */
    public function setSettleType(string $settleType): self
    {
        $this->settleType = $settleType;
        return $this;
    }

    /**
     * 设置外部结算ID
     *
     * @param string $outSettleId
     * @return self
     */
    public function setOutSettleId(string $outSettleId): self
    {
        $this->outSettleId = $outSettleId;
        return $this;
    }

    /**
     * 设置通知地址
     *
     * @param string $notifyUrl
     * @return self
     */
    public function setNotifyUrl(string $notifyUrl): self
    {
        $this->notifyUrl = $notifyUrl;
        return $this;
    }

    /**
     * 设置附言
     *
     * @param string $postscript
     * @return self
     */
    public function setPostscript(string $postscript): self
    {
        $this->postscript = $postscript;
        return $this;
    }

    /**
     * 获取商户号
     *
     * @return string|null
     */
    public function getMerchNo(): ?string
    {
        return $this->merchNo;
    }

    /**
     * 获取机构号
     *
     * @return string|null
     */
    public function getOrgNo(): ?string
    {
        return $this->orgNo;
    }

    /**
     * 获取金额
     *
     * @return string|null
     */
    public function getAmount(): ?string
    {
        return $this->amount;
    }

    /**
     * 获取结算类型
     *
     * @return string|null
     */
    public function getSettleType(): ?string
    {
        return $this->settleType;
    }

    /**
     * 获取外部结算ID
     *
     * @return string|null
     */
    public function getOutSettleId(): ?string
    {
        return $this->outSettleId;
    }

    /**
     * 获取通知地址
     *
     * @return string|null
     */
    public function getNotifyUrl(): ?string
    {
        return $this->notifyUrl;
    }

    /**
     * 获取附言
     *
     * @return string|null
     */
    public function getPostscript(): ?string
    {
        return $this->postscript;
    }
} 